package api

import (
	"api_online/data"
	"api_online/response"
	"net/http"
)

func ResultCache(w http.ResponseWriter, r *http.Request) {
	url := r.URL.Query().Get("url")
	cache := data.Cache.GetResultCacheByUrl(url)

	cache["code"] = "返回码"
	cache["message"]  = "返回消息"
	cache["data"] = "返回数据"

	res, _ := response.SuccessRes(cache)
	_, _ = w.Write(res)
}